{if isset($message)}
    <div style="font-size: 12px;font-style: italic; margin-bottom: 5px;"> {$message}</div>
{else}

<div id="selectedSubrubrics_container">
{literal}
<div style="font-size: 12px; margin-bottom: 5px;">
[<a href="javascript:void(0);" style="text-decoration: underline;" onclick="$$('#selectedSubrubrics_container input').each(function (item) { item.checked = true; }); return false">отметить все</a>]
[<a href="javascript:void(0);" style="text-decoration: underline;" onclick="$$('#selectedSubrubrics_container input').each(function (item) { item.checked = false; }); return false">убрать все отметки</a>]
</div>
{/literal}
{foreach item=this from=$sub_rubrics}
<div style="width: 200px; float: left;">
    <input type="checkbox" name="selectedSubrubrics[]" value="{$this->getPk()}" id="selectedSubrubrics_{$this->getPk()}">
    <label for="selectedSubrubrics_{$this->getPk()}" id="l_selectedSubrubrics_{$this->getPk()}">{$this->name}</label>
</div>
{/foreach}
</div>
{/if}